3.4.89 \(\int \frac {(d+e x^r)^2 (a+b \log (c x^n))}{x^4} \, dx\) [389]

3.4.89.1 Optimal result
3.4.89.2 Mathematica [A] (verified)
3.4.89.3 Rubi [A] (verified)
3.4.89.4 Maple [B] (verified)
3.4.89.5 Fricas [B] (verification not implemented)
3.4.89.6 Sympy [A] (verification not implemented)
3.4.89.7 Maxima [F(-2)]
3.4.89.8 Giac [F]
3.4.89.9 Mupad [F(-1)]

3.4.89.1 Optimal result

Integrand size = 23, antiderivative size = 127 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {b d^2 n}{9 x^3}-\frac {2 b d e n x^{-3+r}}{(3-r)^2}-\frac {b e^2 n x^{-3+2 r}}{(3-2 r)^2}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e x^{-3+r} \left (a+b \log \left (c x^n\right )\right )}{3-r}-\frac {e^2 x^{-3+2 r} \left (a+b \log \left (c x^n\right )\right )}{3-2 r} \]

output
-1/9*b*d^2*n/x^3-2*b*d*e*n*x^(-3+r)/(3-r)^2-b*e^2*n*x^(-3+2*r)/(3-2*r)^2-1 
/3*d^2*(a+b*ln(c*x^n))/x^3-2*d*e*x^(-3+r)*(a+b*ln(c*x^n))/(3-r)-e^2*x^(-3+ 
2*r)*(a+b*ln(c*x^n))/(3-2*r)
 
3.4.89.2 Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.00 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\frac {b n \left (-d^2-\frac {18 d e x^r}{(-3+r)^2}-\frac {9 e^2 x^{2 r}}{(3-2 r)^2}\right )+a \left (-3 d^2+\frac {18 d e x^r}{-3+r}+\frac {9 e^2 x^{2 r}}{-3+2 r}\right )+3 b \left (-d^2+\frac {6 d e x^r}{-3+r}+\frac {3 e^2 x^{2 r}}{-3+2 r}\right ) \log \left (c x^n\right )}{9 x^3} \]

input
Integrate[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^4,x]
 
output
(b*n*(-d^2 - (18*d*e*x^r)/(-3 + r)^2 - (9*e^2*x^(2*r))/(3 - 2*r)^2) + a*(- 
3*d^2 + (18*d*e*x^r)/(-3 + r) + (9*e^2*x^(2*r))/(-3 + 2*r)) + 3*b*(-d^2 + 
(6*d*e*x^r)/(-3 + r) + (3*e^2*x^(2*r))/(-3 + 2*r))*Log[c*x^n])/(9*x^3)
 
3.4.89.3 Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.01, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2772, 27, 1691, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx\)

\(\Big \downarrow \) 2772

\(\displaystyle -b n \int -\frac {\frac {6 d e x^r}{3-r}+\frac {3 e^2 x^{2 r}}{3-2 r}+d^2}{3 x^4}dx-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e x^{r-3} \left (a+b \log \left (c x^n\right )\right )}{3-r}-\frac {e^2 x^{2 r-3} \left (a+b \log \left (c x^n\right )\right )}{3-2 r}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{3} b n \int \frac {\frac {6 d e x^r}{3-r}+\frac {3 e^2 x^{2 r}}{3-2 r}+d^2}{x^4}dx-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e x^{r-3} \left (a+b \log \left (c x^n\right )\right )}{3-r}-\frac {e^2 x^{2 r-3} \left (a+b \log \left (c x^n\right )\right )}{3-2 r}\)

\(\Big \downarrow \) 1691

\(\displaystyle \frac {1}{3} b n \int \left (-\frac {6 d e x^{r-4}}{r-3}+\frac {3 e^2 x^{2 (r-2)}}{3-2 r}+\frac {d^2}{x^4}\right )dx-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e x^{r-3} \left (a+b \log \left (c x^n\right )\right )}{3-r}-\frac {e^2 x^{2 r-3} \left (a+b \log \left (c x^n\right )\right )}{3-2 r}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac {2 d e x^{r-3} \left (a+b \log \left (c x^n\right )\right )}{3-r}-\frac {e^2 x^{2 r-3} \left (a+b \log \left (c x^n\right )\right )}{3-2 r}+\frac {1}{3} b n \left (-\frac {d^2}{3 x^3}-\frac {6 d e x^{r-3}}{(3-r)^2}-\frac {3 e^2 x^{2 r-3}}{(3-2 r)^2}\right )\)

input
Int[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^4,x]
 
output
(b*n*(-1/3*d^2/x^3 - (6*d*e*x^(-3 + r))/(3 - r)^2 - (3*e^2*x^(-3 + 2*r))/( 
3 - 2*r)^2))/3 - (d^2*(a + b*Log[c*x^n]))/(3*x^3) - (2*d*e*x^(-3 + r)*(a + 
 b*Log[c*x^n]))/(3 - r) - (e^2*x^(-3 + 2*r)*(a + b*Log[c*x^n]))/(3 - 2*r)
 

3.4.89.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 1691
Int[((d_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), 
x_Symbol] :> Int[ExpandIntegrand[(d*x)^m*(a + b*x^n + c*x^(2*n))^p, x], x] 
/; FreeQ[{a, b, c, d, m, n}, x] && EqQ[n2, 2*n] && IGtQ[p, 0] &&  !IntegerQ 
[Simplify[(m + 1)/n]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2772
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ 
.))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[(a + 
 b*Log[c*x^n])   u, x] - Simp[b*n   Int[SimplifyIntegrand[u/x, x], x], x]] 
/; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q 
, 1] && EqQ[m, -1])
 
3.4.89.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(477\) vs. \(2(123)=246\).

Time = 1.12 (sec) , antiderivative size = 478, normalized size of antiderivative = 3.76

method result size
parallelrisch \(-\frac {243 b \ln \left (c \,x^{n}\right ) d^{2}+162 b d e n \,x^{r}+117 b \,d^{2} n \,r^{2}+486 d e \,x^{r} a -162 b \,d^{2} n r +486 d e \,x^{r} b \ln \left (c \,x^{n}\right )+12 a \,d^{2} r^{4}-108 a \,d^{2} r^{3}-72 a d e \,r^{3} x^{r}+81 b \,d^{2} n +243 a \,d^{2}+12 \ln \left (c \,x^{n}\right ) b \,d^{2} r^{4}-108 \ln \left (c \,x^{n}\right ) b \,d^{2} r^{3}+351 \ln \left (c \,x^{n}\right ) b \,d^{2} r^{2}-486 \ln \left (c \,x^{n}\right ) b \,d^{2} r +4 b \,d^{2} n \,r^{4}-36 b \,d^{2} n \,r^{3}-216 b d e n r \,x^{r}+351 a \,d^{2} r^{2}-486 a \,d^{2} r +135 a \,e^{2} r^{2} x^{2 r}-324 a \,e^{2} r \,x^{2 r}+81 b \,e^{2} n \,x^{2 r}-18 a \,e^{2} r^{3} x^{2 r}+243 e^{2} x^{2 r} b \ln \left (c \,x^{n}\right )+72 b d e n \,r^{2} x^{r}+432 a d e \,r^{2} x^{r}-810 a d e r \,x^{r}-54 b \,e^{2} n r \,x^{2 r}-18 x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r^{3}+135 x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r^{2}-324 x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r +9 b \,e^{2} n \,r^{2} x^{2 r}+243 e^{2} x^{2 r} a -72 x^{r} \ln \left (c \,x^{n}\right ) b d e \,r^{3}+432 x^{r} \ln \left (c \,x^{n}\right ) b d e \,r^{2}-810 x^{r} \ln \left (c \,x^{n}\right ) b d e r}{9 x^{3} \left (-3+2 r \right )^{2} \left (r^{2}-6 r +9\right )}\) \(478\)
risch \(\text {Expression too large to display}\) \(1930\)

input
int((d+e*x^r)^2*(a+b*ln(c*x^n))/x^4,x,method=_RETURNVERBOSE)
 
output
-1/9/x^3*(243*b*ln(c*x^n)*d^2-54*b*e^2*n*r*(x^r)^2+162*b*d*e*n*x^r+135*a*e 
^2*r^2*(x^r)^2-324*a*e^2*r*(x^r)^2+81*b*e^2*n*(x^r)^2-18*a*e^2*r^3*(x^r)^2 
+243*e^2*(x^r)^2*a+117*b*d^2*n*r^2+486*d*e*x^r*a+243*e^2*(x^r)^2*b*ln(c*x^ 
n)-162*b*d^2*n*r+486*d*e*x^r*b*ln(c*x^n)+12*a*d^2*r^4-108*a*d^2*r^3-72*a*d 
*e*r^3*x^r+81*b*d^2*n+243*a*d^2+12*ln(c*x^n)*b*d^2*r^4-108*ln(c*x^n)*b*d^2 
*r^3+351*ln(c*x^n)*b*d^2*r^2-486*ln(c*x^n)*b*d^2*r+4*b*d^2*n*r^4-36*b*d^2* 
n*r^3-216*b*d*e*n*r*x^r+351*a*d^2*r^2-486*a*d^2*r-18*(x^r)^2*ln(c*x^n)*b*e 
^2*r^3+135*(x^r)^2*ln(c*x^n)*b*e^2*r^2-324*(x^r)^2*ln(c*x^n)*b*e^2*r+72*b* 
d*e*n*r^2*x^r+432*a*d*e*r^2*x^r-810*a*d*e*r*x^r+9*b*e^2*n*r^2*(x^r)^2-72*x 
^r*ln(c*x^n)*b*d*e*r^3+432*x^r*ln(c*x^n)*b*d*e*r^2-810*x^r*ln(c*x^n)*b*d*e 
*r)/(-3+2*r)^2/(r^2-6*r+9)
 
3.4.89.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 466 vs. \(2 (118) = 236\).

Time = 0.30 (sec) , antiderivative size = 466, normalized size of antiderivative = 3.67 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=-\frac {4 \, {\left (b d^{2} n + 3 \, a d^{2}\right )} r^{4} + 81 \, b d^{2} n - 36 \, {\left (b d^{2} n + 3 \, a d^{2}\right )} r^{3} + 243 \, a d^{2} + 117 \, {\left (b d^{2} n + 3 \, a d^{2}\right )} r^{2} - 162 \, {\left (b d^{2} n + 3 \, a d^{2}\right )} r - 9 \, {\left (2 \, a e^{2} r^{3} - 9 \, b e^{2} n - 27 \, a e^{2} - {\left (b e^{2} n + 15 \, a e^{2}\right )} r^{2} + 6 \, {\left (b e^{2} n + 6 \, a e^{2}\right )} r + {\left (2 \, b e^{2} r^{3} - 15 \, b e^{2} r^{2} + 36 \, b e^{2} r - 27 \, b e^{2}\right )} \log \left (c\right ) + {\left (2 \, b e^{2} n r^{3} - 15 \, b e^{2} n r^{2} + 36 \, b e^{2} n r - 27 \, b e^{2} n\right )} \log \left (x\right )\right )} x^{2 \, r} - 18 \, {\left (4 \, a d e r^{3} - 9 \, b d e n - 27 \, a d e - 4 \, {\left (b d e n + 6 \, a d e\right )} r^{2} + 3 \, {\left (4 \, b d e n + 15 \, a d e\right )} r + {\left (4 \, b d e r^{3} - 24 \, b d e r^{2} + 45 \, b d e r - 27 \, b d e\right )} \log \left (c\right ) + {\left (4 \, b d e n r^{3} - 24 \, b d e n r^{2} + 45 \, b d e n r - 27 \, b d e n\right )} \log \left (x\right )\right )} x^{r} + 3 \, {\left (4 \, b d^{2} r^{4} - 36 \, b d^{2} r^{3} + 117 \, b d^{2} r^{2} - 162 \, b d^{2} r + 81 \, b d^{2}\right )} \log \left (c\right ) + 3 \, {\left (4 \, b d^{2} n r^{4} - 36 \, b d^{2} n r^{3} + 117 \, b d^{2} n r^{2} - 162 \, b d^{2} n r + 81 \, b d^{2} n\right )} \log \left (x\right )}{9 \, {\left (4 \, r^{4} - 36 \, r^{3} + 117 \, r^{2} - 162 \, r + 81\right )} x^{3}} \]

input
integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^4,x, algorithm="fricas")
 
output
-1/9*(4*(b*d^2*n + 3*a*d^2)*r^4 + 81*b*d^2*n - 36*(b*d^2*n + 3*a*d^2)*r^3 
+ 243*a*d^2 + 117*(b*d^2*n + 3*a*d^2)*r^2 - 162*(b*d^2*n + 3*a*d^2)*r - 9* 
(2*a*e^2*r^3 - 9*b*e^2*n - 27*a*e^2 - (b*e^2*n + 15*a*e^2)*r^2 + 6*(b*e^2* 
n + 6*a*e^2)*r + (2*b*e^2*r^3 - 15*b*e^2*r^2 + 36*b*e^2*r - 27*b*e^2)*log( 
c) + (2*b*e^2*n*r^3 - 15*b*e^2*n*r^2 + 36*b*e^2*n*r - 27*b*e^2*n)*log(x))* 
x^(2*r) - 18*(4*a*d*e*r^3 - 9*b*d*e*n - 27*a*d*e - 4*(b*d*e*n + 6*a*d*e)*r 
^2 + 3*(4*b*d*e*n + 15*a*d*e)*r + (4*b*d*e*r^3 - 24*b*d*e*r^2 + 45*b*d*e*r 
 - 27*b*d*e)*log(c) + (4*b*d*e*n*r^3 - 24*b*d*e*n*r^2 + 45*b*d*e*n*r - 27* 
b*d*e*n)*log(x))*x^r + 3*(4*b*d^2*r^4 - 36*b*d^2*r^3 + 117*b*d^2*r^2 - 162 
*b*d^2*r + 81*b*d^2)*log(c) + 3*(4*b*d^2*n*r^4 - 36*b*d^2*n*r^3 + 117*b*d^ 
2*n*r^2 - 162*b*d^2*n*r + 81*b*d^2*n)*log(x))/((4*r^4 - 36*r^3 + 117*r^2 - 
 162*r + 81)*x^3)
 
3.4.89.6 Sympy [A] (verification not implemented)

Time = 18.04 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.83 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=- \frac {a d^{2}}{3 x^{3}} + 2 a d e \left (\begin {cases} \frac {x^{r}}{r x^{3} - 3 x^{3}} & \text {for}\: r \neq 3 \\\frac {x^{r} \log {\left (x \right )}}{x^{3}} & \text {otherwise} \end {cases}\right ) + a e^{2} \left (\begin {cases} \frac {x^{2 r}}{2 r x^{3} - 3 x^{3}} & \text {for}\: r \neq \frac {3}{2} \\\frac {x^{2 r} \log {\left (x \right )}}{x^{3}} & \text {otherwise} \end {cases}\right ) - \frac {b d^{2} n}{9 x^{3}} - \frac {b d^{2} \log {\left (c x^{n} \right )}}{3 x^{3}} - 2 b d e n \left (\begin {cases} \frac {\begin {cases} \frac {x^{r - 3}}{r - 3} & \text {for}\: r \neq 3 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{r - 3} & \text {for}\: r > -\infty \wedge r < \infty \wedge r \neq 3 \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + 2 b d e \left (\begin {cases} \frac {x^{r - 3}}{r - 3} & \text {for}\: r \neq 3 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} - b e^{2} n \left (\begin {cases} \frac {\begin {cases} \frac {x^{2 r - 3}}{2 r - 3} & \text {for}\: r \neq \frac {3}{2} \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{2 r - 3} & \text {for}\: r > -\infty \wedge r < \infty \wedge r \neq \frac {3}{2} \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + b e^{2} \left (\begin {cases} \frac {x^{2 r - 3}}{2 r - 3} & \text {for}\: r \neq \frac {3}{2} \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} \]

input
integrate((d+e*x**r)**2*(a+b*ln(c*x**n))/x**4,x)
 
output
-a*d**2/(3*x**3) + 2*a*d*e*Piecewise((x**r/(r*x**3 - 3*x**3), Ne(r, 3)), ( 
x**r*log(x)/x**3, True)) + a*e**2*Piecewise((x**(2*r)/(2*r*x**3 - 3*x**3), 
 Ne(r, 3/2)), (x**(2*r)*log(x)/x**3, True)) - b*d**2*n/(9*x**3) - b*d**2*l 
og(c*x**n)/(3*x**3) - 2*b*d*e*n*Piecewise((Piecewise((x**(r - 3)/(r - 3), 
Ne(r, 3)), (log(x), True))/(r - 3), (r > -oo) & (r < oo) & Ne(r, 3)), (log 
(x)**2/2, True)) + 2*b*d*e*Piecewise((x**(r - 3)/(r - 3), Ne(r, 3)), (log( 
x), True))*log(c*x**n) - b*e**2*n*Piecewise((Piecewise((x**(2*r - 3)/(2*r 
- 3), Ne(r, 3/2)), (log(x), True))/(2*r - 3), (r > -oo) & (r < oo) & Ne(r, 
 3/2)), (log(x)**2/2, True)) + b*e**2*Piecewise((x**(2*r - 3)/(2*r - 3), N 
e(r, 3/2)), (log(x), True))*log(c*x**n)
 
3.4.89.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\text {Exception raised: ValueError} \]

input
integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^4,x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(r-4>0)', see `assume?` for more 
details)Is
 
3.4.89.8 Giac [F]

\[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\int { \frac {{\left (e x^{r} + d\right )}^{2} {\left (b \log \left (c x^{n}\right ) + a\right )}}{x^{4}} \,d x } \]

input
integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^4,x, algorithm="giac")
 
output
integrate((e*x^r + d)^2*(b*log(c*x^n) + a)/x^4, x)
 
3.4.89.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^4} \, dx=\int \frac {{\left (d+e\,x^r\right )}^2\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^4} \,d x \]

input
int(((d + e*x^r)^2*(a + b*log(c*x^n)))/x^4,x)
 
output
int(((d + e*x^r)^2*(a + b*log(c*x^n)))/x^4, x)